#!/bin/sh
# Date:    Thu Apr  8 20:52:19 CEST 2010
# Purpose: FileRunner startup script. 
#          It should be placed in some $PATH directory, e.g. /usr/local/bin.

INSTALL_DIR='/opt/filerunner-<VERSION>'
APP_FILE='fileRunner.py'

if [ -d $INSTALL_DIR ]
then
	cd $INSTALL_DIR
	if [ -x $APP_FILE ]
	then
		./$APP_FILE &
	else
		echo "Cannot start application."
		echo "Please check if the file '$INSTALL_DIR/$APP_FILE' exists and is executable."
	fi
else
	echo "The FileRunner is not installed properly. Please reinstall it."
	echo "The expected installation directory '$INSTALL_DIR' does not exist."
fi
